package com.mi.system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.mi.system.dto.query.DictItemQueryDTO;
import com.mi.system.entity.DictItem;
import com.mi.system.vo.DictItemBriefVO;
import com.mi.system.vo.DictItemVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * Dict item mapper
 *
 * @author jin_huaquan
 * @version 1.0
 * @date 2021/11/1 13:48
 */
@Mapper
public interface DictItemMapper extends BaseMapper<DictItem> {

    /**
     * list dict item
     *
     * @param page  page info
     * @param query query params
     * @return dict item list
     */
    Page<DictItemVO> selectByPage(Page page, @Param("query") DictItemQueryDTO query);

    /**
     * list dict item
     *
     * @param type dict type
     * @return dict item list
     */
    List<DictItemBriefVO> selectByType(@Param("type") String type);
}
